package com.aaa.vegetablemarketexpress.service;

import com.aaa.vegetablemarketexpress.entity.Brand;
import com.aaa.vegetablemarketexpress.entity.Category;
import com.aaa.vegetablemarketexpress.util.Page;
import com.github.pagehelper.PageInfo;

import java.util.List;

/**
 * @FileName: CategoryService
 * @Description:
 * @Author: 张钰哲
 * @CreateTime: 2025/9/6 14:42
 * @Version: 1.0.0
 */

public interface CategoryService {
    /**
     * 分页查询
     * @param page
     * @return
     */
    PageInfo<Category> queryByPage(Page<Category> page);

    /**
     * 根据id查询
     * @param categoryId
     * @return
     */
    Category queryByCategoryId(Long categoryId);

    /**
     * 添加
     * @param category
     * @return
     */
    int add(Category category);

    /**
     * 修改
     * @param category
     * @return
     */
    int update(Category category);

    /**
     * 删除
     * @param categoryId
     * @return
     */
    int deleteBycategoryId(Long categoryId);
    /**
     * 查询分类树形结构
     */
    List<Category> queryCategoryTree();
}
